package com.web.music.model.uml;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;

public class MusicBand extends com.web.music.model.uml.Artist {

	/**
 */
private List<Person> members;

/**
 * Getter of the property <tt>members</tt>
 *
 * @return Returns the members.
 *
 */
public List<Person> getMembers()
{
	return members;
}

/**
 * Returns the element at the specified position in this list.
 *
 * @param index index of element to return.
 * @return the element at the specified position in this list.
 * @see	java.util.List#get(int)
 *
 */
public Person getMembers(int i){
	return (Person) members.get(i);
}

/**
 * Returns an iterator over the elements in this list in proper sequence.
 *
 * @return an iterator over the elements in this list in proper sequence.
 * @see java.util.List#iterator()
 *
 */
public Iterator<Person> membersIterator(){
	return members.iterator();
}

/**
 * Returns <tt>true</tt> if this list contains no elements.
 * 
 * @return <tt>true</tt> if this list contains no elements.
 * @see java.util.List#isEmpty()
 *
 */
public boolean isMembersEmpty(){
	return members.isEmpty();
}

/**
 * Returns <tt>true</tt> if this list contains the specified element.
 *
 * @param element element whose presence in this list is to be tested.
 * @return <tt>true</tt> if this list contains the specified element.
 * @see java.util.List#contains(Object)
 * 
 */
public boolean containsMembers(Person Person){
	return members.contains(Person);
}

/**
 * Returns <tt>true</tt> if this list contains all of the elements of the
 * specified collection.
 *
 * @param elements collection to be checked for containment in this list.
 * @return <tt>true</tt> if this list contains all of the elements of the
 * 	       specified collection.
 * @see java.util.List#containsAll(Collection)
 *
 */
public boolean containsAllMembers(Collection<? extends Person> members){
	return this.members.containsAll(members);
}

/**
 * Returns the number of elements in this list.
 *
 * @return the number of elements in this list.
 * @see java.util.List#size()
 *
 */
public int membersSize(){
	return members.size();
}

/**
 * Returns an array containing all of the elements in this list in proper
 * sequence.
 *
 * @return an array containing all of the elements in this list in proper
 *	       sequence.
 * @see java.util.List#toArray()
 * 
 */
public Person[] membersToArray(){
	return members.toArray(new Person[members.size()]);
}

/**
 * Inserts the specified element at the specified position in this list
 * (optional operation)
 *
 * @param index index at which the specified element is to be inserted.
 * @param element element to be inserted.
 * @see java.util.List#add(int, Object)
 *
 */
public void addMembers(int index, Person Person){
	members.add(index, Person);
}

/**
 * Appends the specified element to the end of this list (optional
 * operation).
 *
 * @param element element to be appended to this list.
 * @return <tt>true</tt> (as per the general contract of the
 *            <tt>Collection.add</tt> method).
 * @see java.util.List#add(Object)
 *
 */
public boolean addMembers(Person Person){
	return members.add(Person);
}

/**
 * Removes the element at the specified position in this list (optional
 * operation).
 *
 * @param index the index of the element to removed.
 * @return the element previously at the specified position.
 * @see java.util.List#remove(int)
 * 
 */
public Object removeMembers(int index){
	return members.remove(index);
}

/**
 * Removes the first occurrence in this list of the specified element 
 * (optional operation).
 *
 * @param element element to be removed from this list, if present.
 * @return <tt>true</tt> if this list contained the specified element.
 * @see java.util.List#remove(Object)
 *
 */
public boolean removeMembers(Person Person){
	return members.remove(Person);
}

/**
 * Removes all of the elements from this list (optional operation).
 *
 * @see java.util.List#clear()
 *
 */
public void clearMembers(){
	members.clear();
}

/**
 * Setter of the property <tt>members</tt>
 *
 * @param members the members to set.
 *
 */
public void setMembers(List<Person> members){
	this.members = members;
}

/*
 * (non-javadoc)
 */
private String title;
 
/**
 * Getter of the property <tt>title</tt>
 *
 * @return Returns the title.
 * 
 */
public String getTitle()
{
	return title;
}



/*
 * (non-javadoc)
 */
private String bandAttribute;
 
/**
 * Getter of the property <tt>bandAttribute</tt>
 *
 * @return Returns the bandAttribute.
 * 
 */
public String getBandAttribute()
{
	return bandAttribute;
}

/**
 * Setter of the property <tt>bandAttribute</tt>
 *
 * @param bandAttribute The bandAttribute to set.
 *
 */
public void setBandAttribute(String bandAttribute ){
	this.bandAttribute = bandAttribute;
}

/**
 * Setter of the property <tt>title</tt>
 *
 * @param title The title to set.
 *
 */
public void setTitle(String title ){
	this.title = title;
}

}

//public void setMembers(List<Person> members) {
//		this.members = members;
//	}
//public List<Person> getMembers() {
//		return members;
//	}